//
//  FCSDKCertificateInfo.h
//  FCSDK
//
//  Created by ZhouYou on 2022/3/31.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSUInteger, FCSDKSSLPinningMode) {
    //AFSSLPinningModeNone
    FCSDKSSLPinningModeNone,
    //AFSSLPinningModeCertificate
    FCSDKSSLPinningModeCertificate,
};

@interface FCSDKSSLObject : NSObject

/**
 是否为https，若为NO,则不启用https,FCSDKSSLObject其它属性为空
 */
@property (nonatomic, assign) BOOL isHttps;

/**
 https证书数据
 */
@property (nonatomic, strong) id certificateData;

/**
 https证书密码
 */
@property (nonatomic, strong) NSString *certificatePassword;

/**
 是否允许无效证书
 */
@property (nonatomic, assign) BOOL allowInvalidCertificates;

/**
 需要验证域名
 */
@property (nonatomic, assign) BOOL validatesDomainName;

/**
 https证书类型
 */
@property (nonatomic, assign) FCSDKSSLPinningMode pinningMode;

@end


/**
 FCSDKCertificateInfo 对象会自动加载项目中配置的证书信息
 */
@interface FCSDKCertificateInfo : FCSDKSSLObject

+ (instancetype)instance;
// 设备id
+ (NSString *)generateUUID;
@end

NS_ASSUME_NONNULL_END
